﻿using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using Microsoft.IdentityModel.Claims;

namespace Riolinx.SocialConnekt.Community.WebParts
{
    public partial class ClaimsViewerUserControl : UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            var claimsPrincipal = Page.User as IClaimsPrincipal;
            if (claimsPrincipal != null)
            {
                IClaimsIdentity claimsIdentity = (IClaimsIdentity)claimsPrincipal.Identity;
                ClaimsGridView.DataSource = claimsIdentity.Claims;
                Page.DataBind();
            }
        }
    }
}
